import { Controller, Inject, Get, Query } from '@midwayjs/core';
import { OnlineService } from "@service/monitor/online.service";
import { ListOnlineDTO } from "@dto/monitor/online.dto";
import { Auth } from "@decorator/auth.decorator";

@Controller('/monitor/online')
export class PostController {
  @Inject()
  onlineService: OnlineService;

  // 获取列表
  @Auth('monitor:online:list')
  @Get('/list')
  async list(@Query() queryParams: ListOnlineDTO) {
    return await this.onlineService.list(queryParams);
  }
}
